<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>${sc.systemName! '品效营销平台'}</title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <!--<link rel="stylesheet" href="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.css">-->
    <link href="/res/plugins/hplus/css/font-awesome.css" rel="stylesheet" type="text/css" media="all" />
    <link href="/res/css/v2/common.css" rel="stylesheet" type="text/css" media="all" />
    <link href="https://static.9hive.cn/global/vendor/nprogress/nprogress.css" rel="stylesheet">
    <!--<link rel="stylesheet" href="/res/plugins/jiuyue/demo-files/demo.css">-->
    <link rel="stylesheet" href="/res/plugins/jiuyue/style.css"></head>
    <!--<link rel="stylesheet" href="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.css">-->
    <!--<link rel="stylesheet" href="https://nsr.9hive.cn/hive/assets/admin/admin2.css">-->

    <style>
        html { overflow:hidden; }
        .a{
            border-bottom: 1px solid #ddd;
            border-top: 1px solid #ddd;
        }
        .header-wrapper .top-nav {
            font-size: 12px;
            color: #eff4fe;
            display: flex;
            display: -webkit-flex;
            margin-right: 40px;
        }
        .header-wrapper .icon-img {
          display: inline-block;
          margin: 9px 10px 10px 0;
          height: 34px;
          width: 34px;
          border: 1px solid #fff;
          border-radius: 34px;
        }
        .header-wrapper .icon-word {
             position: inherit;
             font-size: 12px;
             line-height: 60px;
             z-index: 5;
             margin: 0;
        }
        .header-wrapper .drop {
            display: none;
            position: absolute;
            top: 50px;
            right: -28px;
            width: 110px;
            height: 55px;
            text-align: center;
            border: 1px solid #fff;
            border-radius: 3px;
            background-color: #fff;
            box-shadow: 0 1px 5px rgba(0,0,0,.2);
            z-index: 400;
        }
        .logo-title{
            font-size: 16px;
        }
        .certification:hover{
            cursor: pointer;
        }
    </style>

</head>
<body>
<div class="header-wrapper">
    <div class="header clearfix">
        <div class="logo l">
            <a>
                <img src="${brandLogo!'/res/img/morenlogo.png'}">
                <%if(isNotEmpty(plateformConfig.brand_system_slogan)){%>
                    <span class="logo-title">${plateformConfig.brand_system_slogan}</span>
                <%}else{%>
                    <span class="logo-title">品效营销平台</span>
                <%}%>
            </a>

        </div>
        <div class="view-tab l">
            <!--<a href="${base}/html/update_log.html" class="selected" target="mainFrame">首页</a>-->
            <%
            var index=0,firstId;
            %>
            <%for(br in lbr1!){%>
                <%if(loginMember.b_shoprank! == 'super' || strutil.contain(ranks,br.id!)){%>
                <a href="#${br.url}" <%if(index == 0){%>class="selected"<%}%> >${br.name}</a>
                    <%
                    if(index == 0){
                        firstId = br.url;
                    }
                    index++;
                    %>
                <%}%>
            <%}
            index = 0;
            %>
        </div>
        <div class="top-nav r">
            <!--<span class="account top-nav-item">Hi&nbsp;${loginMember.username}</span>
            <a href="${base}/shop/generate/index?uid=${uid!}" class="more-apps top-nav-item  my-service account">生成</a>
            <a id="event-monitor-help-center" href="###" class="more-apps top-nav-item  my-service" target="_blank">帮助中心</a>
            <span class="more-tools top-nav-item layer">-->
            <%if(isNotEmpty(status) && (status!='2')){%>
                <label  class="" style="padding: 22px">
                    <div class="time-item">
                        <span id="">剩余时间:</span>
                        <span id="day_show">0天</span>
                        <span id="hour_show">0时</span>
                        <span id="minute_show">0分</span>
                        <span id="second_show">0秒</span>
                    </div>
                </label>
            <%}%>
            <img src="${loginMember.userimgurl!'/res/img/headimg.png'}" class="icon-img"/>
            <ul>
                <li>
                    <p class="icon-word">${loginMember.username}<span class="caret"></span></p>
                    <ul class="drop">
                        <li><a href="${base}/html/update_log.html" target="mainFrame">帮助</a></li>
                        <li><a href="/memberCenter/logout">退出</a></li>
                    </ul>
                </li>
            </ul>
        <!--<span class="icon icon-font"></span>
        <ul class="content hide">
            &lt;!&ndash;<li class="item">
                <a href="${base}/memberCenter/old" target="_blank">访问旧版</a>
            </li>&ndash;&gt;
            <li class="item">
                <a href="###" target="_blank">最新功能</a>
            </li>
            <li class="item">
                <a href="###" target="_blank">帮助</a>
            </li>
        </ul>-->
            <!--<a id="event-monitor-logout" class="logout top-nav-item" href="${base}/memberCenter/logout"><span class="icon icon-font"></span></a>-->
        </div>
    </div>
</div>
<div class="body">
    <div class="aside" id="aside">
        <div class="nav-wrapper">
            <div class="title" >

                <span class="l nav-text">系统导航</span>
                <span id="event-monitor-operation" class="operation close icon-font" style="font-size: 16px;margin-top: 13px"></span>
            </div>

            <%for(br in lbr1!){%>
                <ul  class="nav hm-scroll"  <%if(firstId != br.url){%>style="display:none"<%}%> id="${br.url}">
                    <%for(br2 in lbr2!){%>
                        <%if(br2.parent_id == br.id){%>
                            <%if(loginMember.b_shoprank! == 'super' || strutil.contain(ranks,br2.id)){%>
                            <li class="flow-analysis menu-item selected clearfix">
                                <a href="javascript:void(0)" class="expandable recordable open">
                                    <!--<span class="icon icon-font"></span>-->
                                    <!--<i class="fa ${br2.icon!'fa-empire'}" style="margin-left: 20px;"></i>-->
                                    <span class="fa ${br2.icon!'fa-empire'}" style="font-size: 1.3em;margin-left: 20px"></span>
                                    <span class="item-title">${br2.name}</span>
                                </a>
                                <ul class="open expandable-level1 expandable-content" >
                                    <%for(br3 in lbr3!){%>
                                        <%if(br3.parent_id == br2.id){%>
                                            <%if(loginMember.b_shoprank! == 'super' || strutil.contain(ranks,br3.id)){%>
                                                <li>
                                                    <% var url=(br3.url);
                                                       var uid=(uid);
                                                    %>
                                                    <a href="${ strutil.replace(""+url+"",".shopId.",""+uid+"")}" target="mainFrame" class=" ">
                                                        <span class="l menu-label">${br3.name}</span>
                                                        <span class="normal icon-font">&nbsp;</span>
                                                    </a>
                                                </li>
                                            <%}%>
                                        <%}%>
                                    <%}%>
                                </ul>
                            </li>
                            <%}%>
                        <%}%>
                    <%}%>
                </ul>
            <%}%>
        </div>

        <div class="simple-nav-wrapper hide">
            <div class="title"><span class="operation open icon-font" style="font-size: 16px;margin-top: 13px"></span></div>
            <%for(br in lbr1!){%>
            <ul class="simple-nav" id="${br.url}simple" <%if(!brLP.first){%>style="display:none"<%}else{%>style="display:block" <%}%> id="${br.url}">
                    <%for(br2 in lbr2!){%>
                        <%if(br2.parent_id == br.id){%>
                            <%if(loginMember.b_shoprank! == 'super' || strutil.contain(ranks,br2.id)){%>
                                <li class="flow-analysis menu-item clearfix hover-menu" >
                                    <!--<a class="super-menu-item" href="javascript:void(0)">
                                        <span class="icon icon-font"></span>
                                    </a>-->
                                    <!--<i class="fa ${br2.icon!'fa-empire'}" style="font-size: 16px"></i>-->
                                    <span class="fa ${br2.icon!'fa-empire'}" style="font-size: 1.3em;"></span>
                                    <ul class="item-content hm-scroll hide">
                                        <li class="nav-title">${br2.name}</li>
                                        <%for(br3 in lbr3!){%>
                                            <%if(br3.parent_id == br2.id){%>
                                                <%if(loginMember.b_shoprank! == 'super' || strutil.contain(ranks,br3.id)){%>
                                                <li>
                                                    <% var url=(br3.url);
                                                    if(strutil.contain(url,'?')){
                                                    url=url+'&_auth='+auth!;
                                                    }else{
                                                    url = url + '?_auth='+auth!;
                                                    }
                                                    var uid=(uid);
                                                    %>
                                                    <a class="_menu-link" href="${ strutil.replace(""+url+"",".shopId.",""+uid+"")}" target="mainFrame" class=" ">
                                                        <span data="95" class="l menu-label">${br3.name}</span>
                                                        <span class="normal icon-font"></span>
                                                    </a>
                                                </li>
                                                <%}%>
                                            <%}%>
                                        <%}%>
                                    </ul>
                                </li>
                            <%}%>
                        <%}%>
                    <%}%>
            </ul>
            <%}%>
        </div>
    </div>
    <div class="misc" id="misc">
        <ul class="clearfix">
            <li id="event-monitor-consultation" class="item">
                <a class="consultation item-icon icon-font" href="###" target="_blank"><span class="icon"></span></a>
                <a class="consultation-text item-text" href="###" target="_blank"><span class="text">在线客服</span></a>
            </li>
            <li id="event-monitor-message" class="item">
                <a class="message item-icon icon-font" href="javascript:void(0)"><span class="icon"></span></a>
                <a id="feedback" class="message-text item-text" href="javascript:void(0)"><span class="text">反馈建议</span></a>
            </li>
            <li id="event-monitor-introduction" class="item" toggle-data="introduction-qr-code">
                <a class="introduction item-icon icon-font" href="javascript:void(0)">
                    <span class="icon"></span>
                </a>
                <a class="introduction-text item-text" href="javascript:void(0)">
                    <span class="text">关注微信</span>
                </a>
            </li>
            <li class="item" id="back-to-top" style="display:none">
                <a class="top item-icon icon-font" href="#top"><span class="icon"></span></a>
                <a class="top-text item-text" href="#top"><span class="text">返回顶部</span></a>
            </li>
        </ul>
    </div>
    <div class="misc-body">
        <a href="javascript:void(0)" class="misc-body-item introduction-qr-code hm-dropdown-shadow" style="display:none">
            <!--<img src="/web/image/wechart-qr.png" alt="关注微信" />-->
        </a>
    </div>
    <div class="main" style="overflow: hidden;">
        <iframe class="J_iframe"  frameborder="0"  style="overflow-x:hidden;overflow-y: auto;" id="mainFrame" name="mainFrame" width="100%" height="100%" src="${base}/html/update_log.html"></iframe>
    </div>

</div>

<!--<div class="footer">-->
    <!--<span>©2016 ${sc.shopName!}</span>-->
<!--</div>-->
<script src="/res/plugins/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="https://static.9hive.cn/global/vendor/nprogress/nprogress.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-copy/clipboard.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>
<script type="text/javascript">
    NProgress.start();
    window.onload = function() {
        NProgress.done();
    };
    $().ready(function() {
        var $menu = $(".nav-wrapper .nav");
        var $simplemenu=$(".simple-nav-wrapper .simple-nav");

        var $menuItem = $(".nav-wrapper .nav a");
        var $nava = $(".view-tab a");
        $nava.click(function(){
            var $this = $(this);
            $nava.removeClass("selected");
            $this.addClass("selected");

            //menu
            var $currentMenu = $($this.attr("href"));
            $menu.hide();
            $currentMenu.show();

            //simpleMenu
            var $currentSimpleMenu=$($this.attr("href")+"simple");
            $simplemenu.hide();
            $currentSimpleMenu.show();
            return false;
        });

        $menuItem.click(function() {
            var $this = $(this);
            $menuItem.removeClass("selected");
            $this.addClass("selected");
        });


        var resizeContentH = function(contentID,leftId){
            jQuery(contentID).height(jQuery(window).height() - 50);
            $("#"+leftId).height(jQuery(document).height() - 70);
        };

        /*窗口尺寸重载*/
        resizeContentH("#mainFrame","aside");
        $(window).resize(function(){
            resizeContentH("#mainFrame","aside");
        });

        //所有二级菜单的展开与闭合
        $(".operation").click(function () {
            var $this = $(this);
            var ppaerntClass=$this.parent().parent().attr("class");
            //alert(ppaerntClass.indexOf("nav-wrapper"));
            if(ppaerntClass.indexOf("nav-wrapper")==0){
                $(".nav-wrapper").attr("class","nav-wrapper hide");
                $(".simple-nav-wrapper").attr("class","simple-nav-wrapper");
                $(".main").attr("style","margin-left: 51px;");
            }else if(ppaerntClass.indexOf("simple-nav-wrapper")==0){
                $(".nav-wrapper").attr("class","nav-wrapper");
                $(".simple-nav-wrapper").attr("class","simple-nav-wrapper hide");
                $(".main").attr("style","margin-left: 181px;");
            }
        });

        //三级菜单闭合或者展开
        $(".expandable").click(function () {
            $this = $(this);
            var uClass=$this.next().attr("class");
            if(uClass.indexOf("open")==0){
                $this.next().css('display', 'none');
                $this.next().attr("class","close expandable-level1 expandable-content");
            }else{
                $this.next().css('display', 'block');
                $this.next().attr("class","open expandable-level1 expandable-content");
            }
        });

        //鼠标移上去和移下来事件
        $(".hover-menu").on("mouseover",function () {
            $this = $(this);
            $this.find(".item-content").attr("class","item-content hm-scroll");
            $this.find(".item-content").parent('li').addClass("a");
        });
        $(".hover-menu").on("mouseout",function () {
            $this = $(this);
            $this.find(".item-content").attr("class","item-content hm-scroll hide");
            $this.find(".item-content").parent('li').removeClass("a");
        });

        $(function(){
            $(".top-nav ul li:has(ul)").hover(function(){
                $(this).children("ul").stop(true,true).slideDown(400);
            },function(){
                $(this).children("ul").stop(true,true).slideUp("fast");
            });
        })
    });


    function _send(type,sel,val){
        //alert(v);
        if(type == "append"){
            $("#mainFrame").contents().find('#'+sel).append(val);
        }else if(type == "val"){
            $("#mainFrame").contents().find('#'+sel).val(val);
        }else if(type == "html"){
            $("#mainFrame").contents().find('#'+sel).html(val);
        }else if(type == "method"){//调用子页面的receive方法
            $("#mainFrame")[0].contentWindow.receive(val);
        }

    }

    function _get(sel,val){
        if(val)
            return $("#mainFrame").contents().find('#'+sel).find(val);
        else
            return $("#mainFrame").contents().find('#'+sel).val();
    }


    //urlEncode
    function genUrl(url){
        return url + "?trueUrl=" + encodeURIComponent(url);
    }


</script>
<script type="text/javascript">
    //var intDiff = "${countDown!}"; //倒计时总秒数量
    var intDiff = "${countDown!}"; //倒计时总秒数量
    var status="${status!}";
    function timer(intDiff) {
        window.setInterval(function() {
            var day = 0,
                hour = 0,
                minute = 0,
                second = 0; //时间默认值
            if (intDiff > 0) {
                day = Math.floor(intDiff / (60 * 60 * 24));
                hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
            }else if(intDiff==0){
                if(status!=''&& status=='0'){
                    certificationTips();
                }else if(status!='' && status=='1'){
                    window.location.href = "/shop/companyinfo/incertificationForm";
                }else if(status!='' && status=='3'){
                    window.location.href = "/shop/companyinfo/failverified";
                }
            }
            if (minute <= 9) minute = '0' + minute;
            if (second <= 9) second = '0' + second;
            $('#day_show').html(day + "天");
            $('#hour_show').html('<s id="h"></s>' + hour + '时');
            $('#minute_show').html('<s></s>' + minute + '分');
            $('#second_show').html('<s></s>' + second + '秒');
            intDiff--;
        }, 1000);
    }

    function updateTipsInfo() {
        var tipsInfo="${tipsInfo}";
        if(tipsInfo=='1'){
            layer.msg('系统提示<br><br>您的企业认证已通过,欢迎使用数字营销平台!<br><br>', {
                skin: 'layui-layer-molv' //样式类名
                ,closeBtn: 0
            }, function(){
                $.ajax({
                    url: "/shop/companyinfo/updateTipsInfo",
                    type: 'GET',
                    data:{
                        "tipsInfo":"0"
                    },
                    success: function(data){
                        if (data.state=="ok" == true){

                        }else{

                        }
                    }});
            })
        }
    }

    $(function() {
        timer(intDiff);
        setTimeout(updateTipsInfo,1000);


    });


    //提示认证弹窗
    function certificationTips(){
        layer.open({
            closeBtn: 0, //不显示关闭按钮
            title: false, //不显示标题
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: ['380px', '240px'], //宽高
            content: '<h2 style="text-align: center;margin-top:30px;font-size: 18px;color: #303e45">系统信息</h2><br><br>' +
            '<h2 style="text-align: center;font-size: 14px;color: #5a6069">您的试用期已到期,感谢您的使用!</h2>'+
            '<h3 style="text-align: center;color: #a3afb7">如果想继续使用您可以通过<u class="certification" style="color: #15baff" onclick="certification()">企业认证</u>成为正式用户!</h3><br><br>'+
            '<div style="text-align: center"><button type="button" class="btn btn-primary"  style="height: 32px;border-radius: 5px;background-color: #f8f8f8;border:solid 1px #e5e5e5" onclick="logout()">安全退出</button><button type="button" class="btn btn-success" style="background-color: #15baff;height: 32px;border-radius: 5px;margin-left:8px;color:white" onclick="certification()">立即认证</button></div>'
        });
    }
    //点击退出
    function logout() {
        window.location="/memberCenter/logout";
    }
    //点击认证
    function certification() {
        window.location.href="/shop/companyinfo/certificationForm"
    }
</script>
</body>

</html>
